<HTML>
<HEAD>
<link rel=stylesheet type="text/css" href="styles.css">
<TITLE>Embedding Simkin in your Java  application</TITLE>
</HEAD>
<BODY>

<H1>
Embedding Simkin in your <br>Java application</H1>
<hr>
<p>
Simkin scripts are executed by the <a href="api/simkin/Interpreter.html">Simkin Interpreter</a> class. 
<p>
When a piece of Simkin script accesses the method or field of an object, the Interpreter does one of two things:
<ol>
<li>If the object implements the <a href="api/simkin/Executable.html">Executable</a> interface, it calls either <b>getValue</b>,<b>setValue</b> or <b>method</b> to access or change a field, or call a method</li>
<li>In all other cases, it uses <b>Java Introspection</b> to find a matching public field or method within the class</li>
</ol>
This means that Simkin script can automatically access <i>any</i> public field or method within your application.
<p>
Typically Simkin scripts are attached to particular Java objects and are contained within data files or databases. This means you can use Simkin to extend the data and behaviour of these Java objects without using Java. 
<p>
Simkin provides 3 classes that help attach scripts to Java objects:
<ul>
<li><a href="api/simkin/XMLExecutable.html">XMLExecutable</a> lets you add fields and Simkin methods from an XML file</li>
<li> <a href="api/simkin/ScriptedExecutable.html">ScriptedExecutable</a> lets you add fields and Simkin methods from a hierarchical <a href="api/simkin/TreeNode.html">TreeNode file</a></li>
<li><a href="api/simkin/ExecutableRoot.html">ExecutableRoot</a> provides a base class which implements the <a href="api/simkin/Executable.html">Executable</a> interface</li>
</ul>
</BODY>
</HTML>
